<template>
  <div class="info_wrap">
    <div class="info_left">
      <img v-lazy="artist.picUrl" alt="" />
    </div>
    <div class="info_right">
      <div>
        <el-tag>歌手</el-tag>
        <span>{{ artist.name }}</span>
      </div>
      <div>
        <a href="#">单曲数：</a> <span>{{ artist.musicSize }}</span>
      </div>
      <div>
        <a href="#">专辑数：</a> <span>{{ artist.albumSize }}</span>
      </div>
      <div><a href="#">mv 数：</a> <span>10</span></div>
      <div class="desc">
        <a href="#">简 介：</a> <span>{{ des }}</span>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: ['artist'],
  data () {
    return {
      des: ''
    }
  },
  beforeMount () {
    // 兄弟传参的接受
    this.$bus.$on('senddesc', res => {
      this.des = res
    })
  }
}
</script>
<style lang="less" scoped>
.info_wrap {
  width: 95%;
  margin: 10px auto;
  display: flex;

  height: 260px;
  .info_left {
    width: 300px;
    height: 260px;
    display: flex;
    justify-content: center;
    align-items: center;
    img {
      width: 200px;
      height: 180px;
    }
  }
  .info_right {
    height: 260px;
    flex: 1;
    margin-left: 30px;
    div {
      line-height: 30px;
      &:nth-child(1) {
        margin-top: 20px;
        .el-tag {
          margin-right: 20px;
        }
      }
    }
  }
}
.desc {
  height: 80px;
  width: 90%;
  line-height: 30px;
  text-overflow: ellipsis;
  overflow: hidden;
  // 多行省略号
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
</style>
